package com.heima.controller;

import com.heima.pojos.dto.findAssignmentsDto;
import com.heima.service.WorkService;
import com.heima.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/v1/work")
@RestController
public class WorkController {
    @Autowired
    private WorkService workService;


    /**
     * 作业分页查询
     *
     * @param findAssignments
     * @return
     *
     *
     *查询不出来
     */
    //todo
    @PostMapping("/showWorks")
    public R selectWork(@RequestBody findAssignmentsDto findAssignments) {
        return workService.selectWork(findAssignments);
    }

}
